from flask import session
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from info import create_app,db

app = create_app()

#管理器实例化，让管理器实例关联程序实例
manage = Manager(app)
# 使用迁移框架
Migrate(app,db)
# 添加迁移命令
manage.add_command('db',MigrateCommand)







if __name__ == '__main__':
    # app.run(debug=True)
    manage.run()